// 导入你的布局组件
import Layout from '@/views/index.vue'

// 导入你的视图组件
// 使用动态导入 (Lazy Loading) 是推荐的方式
const componentMap = {
  // 布局组件的字符串映射
  layout: Layout, // 假设后端返回 'layout' 标识
  // 页面组件的字符串映射
  home: () => import('@/views/home/index.vue'), // 假设后端返回 'home'
  system: () => import('@/views/system/index.vue'), // 系统设置
  menu: () => import('@/views/system/menu/index.vue'),
  role: () => import('@/views/system/role/index.vue'),
  users: () => import('@/views/system/users/index.vue'),
  userinfo: () => import('@/views/system/userinfo/index.vue'),
  basics: () => import('@/views/basics/index.vue'), // 基础设置
  courses: () => import('@/views/basics/courses/index.vue'), // 假设后端返回 'courses'
  department: () => import('@/views/basics/department/index.vue'),
  coursetype: () => import('@/views/basics/coursetype/index.vue'),
  round: () => import('@/views/basics/round/index.vue'),
  courseDetails: () => import('@/views/basics/courseDetails/index.vue'),
  student: () => import('@/views/student/index.vue'), // 学生管理
  courseSelection: () => import('@/views/student/CourseSelection/index.vue'), // 课程选择
  myCourse: () => import('@/views/student/myCourse/index.vue'), // 我的课程
  teacher: () => import('@/views/teacher/index.vue'), // 教师管理
  myClass: () => import('@/views/teacher/myClass/index.vue'), // 我的班级
  gradeManagement: () => import('@/views/teacher/gradeManagement/index.vue'), // 成绩管理
  // 你原始配置中的 404 页面也需要映射，因为动态 catch-all 会指向它
  404: () => import('@/views/404.vue'), // 假设我们会用 '404' 标识它
}

export default componentMap
